package log_util

import (
	"github.com/ztrue/tracerr"
	"log"
)

func PrintTrace(err tracerr.Error) {
	frames := tracerr.StackTrace(err)
	errString := "Error: " + err.Error()
	for _, f := range frames {
		errString += "\n  " + f.String()
	}
	log.Println(errString)
}

func PrintTraceDetail(err tracerr.Error) {
	log.Println(tracerr.SprintSourceColor(err))
}
